<!DOCTYPE HTML>
<html>
<head>
    <meta charset=utf-8>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1"/>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="cache-control" content="no-cache">
    <meta name="description" content="商城示例">
    <meta name="keywords" content="商城官网示例">
    <title>JavaEE商城</title>
    <link href="css/style.css" rel="stylesheet"/>
</head>
<body>
<div id="head">
    <div class="memu">
        <div class="logo"><img src="images/logo.ico"></div>
        <div class="nav">
            <ul class="nav_firstul">
                <li><a href="home.html">首页</a></li>
                <li><a href="xtgg.html">系统公告</a></li>
                <!-- <li><a href="">论坛与帮助</a></li>  -->
            </ul>
        </div>
        <div class="loginse">
            <a href="login.html">登录</a> &nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="register.html">注册</a>
        </div>
    </div>
</div>
<div class="banner">
    <a class="bannerbtn" href="/pages/book/index.jsp">开始了解</a>
    <div class="news">
        <div class="newli">
            <i></i>
            <div id="rollAD"
                 style="height:42px; position:relative; margin:0 auto;overflow:hidden; width:860px; float:left;">
                <ul id="rollText">
                    <!--<li><a href="">接口安全升级，请iOS开发者补全信息</a></li> -->
                </ul>
            </div>
            <a href="http://www.baidu.com" class="more">更多></a>
        </div>
    </div>
</div>

<div id="content">
    <div class="rowss">
        <div class="col-lg-1">
            <img src="images/icon_sj.png">
            <h2>书籍收藏</h2>
            <p>各种古法典，人文地理</p>
        </div>
        <div class="col-lg-1">
            <img src="images/icon_zd.png">
            <h2>现代科技</h2>
            <p>科学，电子，黑科技</p>
        </div>
        <div class="col-lg-1">
            <img src="images/icon_more.png">
            <h2>更多好玩的</h2>
            <p>成为会员，赠积分，赢大礼</p>
        </div>
    </div>
</div>
<div id="footer">
    <div class="foot">
        <p class="copyright">© 2019 Web Book Store Management platform.</p>
        <p class="footlike"><a href="user_xy.html">用户协议</a> &nbsp; | &nbsp;
            <!-- --> <a href="contact_us.html">联系我们</a></p>
    </div>
</div>
</body>
<script type="text/javascript" src="/static/assets/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/assets/js/template.js"></script>
<script type="text/javascript" src="js/init.js"></script>
<script type="text/javascript" src="/static/assets/js/notice.js"></script>

<script type="text/javascript">
    $(function () {
        notice.new(function (data) {
            if (data.result && data.data == "[]") {
                $("#rollText").html('<li><a href="">暂无公告信息</a></li>');
                return;
            }

            // append
            var li = '';
            $.each(data.data, function (index, val) {
                if (data.old) {
                    li += '<li><a href="">' + val.title + '</a></li>';
                } else {
                    li += '<li style="background:url(images/new.gif) no-repeat center right;"><a href="">' + val.title + '</a></li>';
                }
            })

            $("#rollText").html(li);
        });
    });

    // <![CDATA[
    var textDiv = document.getElementById("rollText");
    var textList = textDiv.getElementsByTagName("a");
    if (textList.length > 1) {
        var textDat = textDiv.innerHTML;
        var br = textDat.toLowerCase().indexOf("<br", textDat.toLowerCase().indexOf("<br") + 3);
        //var textUp2 = textDat.substr(0,br);
        textDiv.innerHTML = textDat + textDat + textDat.substr(0, br);
        textDiv.style.cssText = "position:absolute; top:0";
        var textDatH = textDiv.offsetHeight;
        MaxRoll();
    }
    var minTime, maxTime, divTop, newTop = 0;
    function MinRoll() {
        newTop++;
        if (newTop <= divTop + 42) {
            textDiv.style.top = "-" + newTop + "px";
        } else {
            clearInterval(minTime);
            maxTime = setTimeout(MaxRoll, 2000);
        }
    }
    function MaxRoll() {
        divTop = Math.abs(parseInt(textDiv.style.top));
        if (divTop >= 0 && divTop < textDatH - 42) {
            minTime = setInterval(MinRoll, 1);
        } else {
            textDiv.style.top = 0;
            divTop = 0;
            newTop = 0;
            MaxRoll();
        }
    }
    // ]]>
</script>
</html>